SOURCES= dic-main.c data.c dict.c key.c auxiliares.c hash.c crw.c
CC=gcc
CFLAGS= -g -Wall -ansi -pedantic
OBJECTS=$(SOURCES:.c=.o)
TARGET= dic-main
LIBS = -L./lib -lcrw

all: $(TARGET)

clean:
	rm -f $(TARGET) $(OBJECTS) .depend 

distclean:
	rm -f $(TARGET) $(OBJECTS) .depend *~ *.tgz

dist:
	tar -czvf libcrw.tgz $(SOURCES) pru.txt ./lib/*.h ./lib/*.a Makefile

-include .depend

.depend: $(SOURCES) *.h
	gcc -MM $(SOURCES) >.depend

$(TARGET): $(OBJECTS)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
